package com.example.demo.service;

import com.example.demo.model.SysRole;
import com.example.demo.model.User;
import com.example.demo.repo.UserRepository;
import com.example.demo.utils.DateUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

@Service
public class UserService {
    private DateUtil dateUtil= DateUtil.getDate();
    private Logger logger= LoggerFactory.getLogger(UserService.class);
    @Autowired
    private UserRepository userRepository;



    @Autowired
    private SysRoleService sysRoleService;

    public User findUserByAccount(String account) {
        return userRepository.findUserByUsername(account);
    }




}
